package com.example.testandroid.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.example.testandroid.R;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	public void buttonClick(View source) {
		int buttonId = source.getId();
		Intent intent;
		switch (buttonId) {
			case R.id.neonlightBtn :
				intent = new Intent(MainActivity.this,
						NeonLightActivity.class);
				startActivity(intent);
				break;

			case R.id.textviewBtn :
				intent = new Intent(MainActivity.this,
						TextViewActivity.class);
				startActivity(intent);
				break;
			case R.id.toggleBtn :
				intent = new Intent(MainActivity.this,
						ToggleButtonTestActivity.class);
				startActivity(intent);
				break;
			case R.id.clockBtn:
				intent = new Intent(MainActivity.this,
						ClockActivity.class);
				startActivity(intent);
				break;
			case R.id.registerBtn:
				intent = new Intent(MainActivity.this,
						RegisterActivity.class);
				startActivity(intent);
				break;
			default :
				break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.launcher, menu);
		return true;
	}

}
